package com.zhang.mail.user;

import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @ClassName Test
 * @Description
 * @Author zhang_xfei
 * @DATE 2018 2018/10/12 17:58
 **/
@RestController
@RequestMapping("user")
public class Test {
    @GetMapping("{id}")
    public String test(@PathVariable Long id){
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("message", "321321");
        return JSON.toJSONString(map);
    }
}
